<div class="users index">
<h2><?php __('Usuarios registrados en el sistema');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('P&aacute;gina %page% de %pages%, mostrando %current% registros de %count% total, empezando %start%, terminando en %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
	<th><?php echo $paginator->sort('id');?></th>
	<th><?php echo $paginator->sort('nombres');?></th>
	<th><?php echo $paginator->sort('apellidos');?></th>
	<th><?php echo $paginator->sort('email');?></th>
	<th><?php echo $paginator->sort('password');?></th>
	<th><?php echo $paginator->sort('telefono');?></th>
	<th><?php echo $paginator->sort('direccion');?></th>
	<th><?php echo $paginator->sort('activo');?></th>
	<th><?php echo $paginator->sort('hash');?></th>
	<th><?php echo $paginator->sort('created');?></th>
	<th><?php echo $paginator->sort('modified');?></th>
	<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($users as $user):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<?php echo $user['User']['id']; ?>
		</td>
		<td>
			<?php echo $user['User']['nombres']; ?>
		</td>
		<td>
			<?php echo $user['User']['apellidos']; ?>
		</td>
		<td>
			<?php echo $user['User']['email']; ?>
		</td>
		<td>
			<?php echo $user['User']['password']; ?>
		</td>
		<td>
			<?php echo $user['User']['telefono']; ?>
		</td>
		<td>
			<?php echo $user['User']['direccion']; ?>
		</td>
		<td>
			<?php if($user['User']['activo']){ echo "SI"; }else{ echo "NO"; } ?>
		</td>
		<td>
			<?php echo $user['User']['hash']; ?>
		</td>
		<td>
			<?php echo $user['User']['created']; ?>
		</td>
		<td>
			<?php echo $user['User']['modified']; ?>
		</td>
		<td class="actions">
			<?php echo $html->link(__('Ver', true), array('action'=>'view', $user['User']['id'])); ?>
			<?php echo $html->link(__('Modificar', true), array('action'=>'edit', $user['User']['id'])); ?>
			<?php echo $html->link(__('Borrar', true), array('action'=>'delete', $user['User']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $user['User']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('Anterior', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('Siguiente', true).' >>', array(), null, array('class'=>'disabled'));?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Nuevo Usuario', true), array('action'=>'add')); ?></li>
		<li><?php echo $html->link(__('Ver Clasificados', true), array('controller'=> 'clasificados', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('Nuevo Clasificado', true), array('controller'=> 'clasificados', 'action'=>'add')); ?> </li>
	</ul>
</div>
